<template>
	<view>
		<view style="padding: 10rpx;">
			<navigator url="/pages/components/News/News">新闻界面</navigator>
		</view>
		<view class="smart-container">1.容器</view>
		<navigator url="/pages/components/view/view">
			<text>view视图</text>
		</navigator>
		<navigator url="/pages/components/scroll-view/scroll-view">
			<text>scroll-view视图</text>
		</navigator>
		<view class="smart-panel-h" @click="goDetailPage('swiper')">
			<text>可滑动视图</text>
		</view>
		<view class="smart-container">2.基础内容</view>
		<view class="smart-panel-h" @click="goDetailPage('text')">
			<text>text文本编辑</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('icon')">
			<text>icon图标</text>
		</view>
		<view class="smart-container">3.表单组件</view>
		<view class="smart-panel-h" @click="goDetailPage('button1')">
			<text>button按钮</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('checkboxs')">
			<text>checkbox多选框</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('labels')">
			<text>label标签组件</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('inputs')">
			<text>input输入框</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('textareas')">
			<text>textarea多行文本输入框</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('formtable')">
			<text>form表单</text>
		</view>
		<view class="smart-container">4.导航组件</view>
		<view class="smart-panel-h" @click="goDetailPage('navigators')">
			<text>navigator</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		
		methods: {
			goDetailPage(e) {
				if (typeof e === 'string') {
					uni.navigateTo({
						url: '/pages/components/' + e + '/' + e
					});
				} else {
					uni.navigateTo({
						url: e.url
					});
				}
			}
		}
	}
</script>

<style>

</style>